<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Contact extends Model
{
    use HasFactory;
    public function groups(){
        return $this->belongsToMany(Group::class,'contact_group','contact_id','group_id');
    }
    public function contact_records(){
        return $this->hasMany(ContactRecord::class,'contact_id');
    }
}

